package com.test.ch05;

public class Car {
    private String color;
    private String brand;
    private double price;
    public Car(){}
    public Car(String color,String brand,double price)
    {
        this.color=color;
        this.brand=brand;
        this.price=price;
    }
    public void goForward()
    {
        System.out.println("前进");
    }
    public void goBackward()
    {
        System.out.println("后退");
    }
    public void tun()
    {
        System.out.println("转弯");
    }
    public void setColor(String color)
    {
        this.color=color;
    }
    public void setBrand(String brand)
    {
        this.brand=brand;
    }
    public void setPrice(double price)
    {
        this.price=price;
    }
    public String getColor()
    {
        return this.color;
    }
    public String getBrand()
    {
        return this.brand;
    }
    public double getPrice()
    {
        return this.price;
    }
    public void show()
    {
        System.out.println("汽车颜色："+this.color+"汽车品牌："+this.brand+"汽车价格："+this.price);
    }
}
